package com.note.es.mapping;

import java.lang.reflect.Field;
import java.util.HashSet;
import java.util.Set;

/**
 * @ClassName: Hotspot
 * @Description: 全球热点mapping属性
 */
public class Hotspot {

    public final static String ID = "id";
    public final static String HOT_TYPE = "hotType";
    public final static String SENTIMENT_ID = "sentimentId";
    public final static String PUBDATE = "pubdate";
    public final static String PUBTIME = "pubtime";
    public final static String MEDIA_COUNT = "mediaCount";
    public final static String MEDIA_NAME = "mediaName";
    public final static String COUNTRY_COUNT  = "countryCount";
    public final static String COUNTRY = "country";
    public final static String HOT_SPOTS = "hotSpots";
    public final static String TRANSFER = "transfer";
    public final static String LATITUDE  = "latitude";
    public final static String LONGITUDE = "longitude";
    public final static String TITLE = "title";
    public final static String TEXT = "text";
    public final static String EXCERPT = "excerpt";
    public final static String KEYWORDS = "keywords";
    public final static String URL = "url";

    private static Set<String> fields;

    static {
        try {
            fields = new HashSet<>();
            Field[] clazzFields = Hotspot.class.getFields();
            for (Field clazzField : clazzFields) {
                fields.add(String.valueOf(clazzField.get(null)));
            }
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }

    public static Set<String> getFields() {
        return fields;
    }
}
